<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Academics</title>
    <link href="../css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="../css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="../css/animate.css" rel="stylesheet">
    <link href="../css/style.css?v=4.1.0" rel="stylesheet">
    <link href="../css/plugins/treeview/bootstrap-treeview.css" rel="stylesheet">
    <link href="../css/scholar/scholar.css" rel="stylesheet">
    <link rel="stylesheet" href="../css/scholar/analysis.css">
</head>
<body>
<div class="content" id="box" v-cloak>
    <div class="top">
        <span class="return">
            <a :href="'searchList.html?keyword='+keyword+'&zh_keyword='+zh_keyword">
            <i class="fa fa-reply" aria-hidden="true"></i></a>
        </span>
        <!--<span class="analysis-logo">NexMagic scholar</span>-->
        <span class="analysis-logo"><img src="../img/scholar/logo1.png" style="height:25px;margin-bottom:15px;"/></span>
    </div>
    <div class="content-all">
        <div class="content-menu">
            <ul>
                <li class="menu-li"><a :href="'analysis.html?version=' + timestamp_"><i class="fa fa-home"></i><span>Home</span></a>
                </li>
                <li class="menu-li checked"><a :href="'learning.html?version=' + timestamp_"><i
                        class="fa fa-book"></i><span>Academics</span></a>
                </li>
                <li class="menu-li"><a :href="'wisdomAtlas.html?version=' + timestamp_"><i
                        class="fa fa-asterisk"></i><span>Graph</span></a></li>
                <li class="menu-li"><a :href="'discovery.html?version=' + timestamp_"><i
                        class="fa fa-compass"></i><span>Find</span></a></li>
            </ul>
        </div>
        <div class="row">
            <div class="content-right">
                <div class="col-md-2 userinfo">
                    <img class="userinfo-head" onerror="nofind(this)"
                         :src="(expert.img != undefined && expert.img != '' && expert.img != null)?(resourceUrl + expert.img):'../img/scholar/head/common-head.png'">
                    <span class="userinfo-span realname" style="width: 100%;margin: 0;padding: 0">{{expert.name}}</span>
                    <!--<span class="userinfo-span"><i class="fa fa-briefcase"></i> {{expert.position != undefined ? expert.position : ''}}</span>
                    --><span class="userinfo-span"><i class="fa fa-map-marker"></i> {{expert.country != undefined ? expert.country : ''}}</span>
                    <span class="userinfo-span"><i class="fa fa-home"></i> {{expert.authorsOrg}}</span>
                    <div class="skill-div">
                        <span class="skill-item" v-for="item in expert.foSets">{{item}}</span>
                    </div>
                    <div class="userinfo-table">
                        <table>
                            <tr>
                                <td>N-index:</td>
                                <td>{{expert.nIndex.toFixed(2)}}</td>
                                <td><img id="nIndex-img" height="9" width="14"/></td>
                            </tr>
                            <tr>
                                <td>A-index:</td>
                                <td>{{expert.aIndex.toFixed(2)}}</td>
                                <td><img id="aIndex-img" height="9" width="14"/></td>
                            </tr>
                            <tr>
                                <td>I-index:</td>
                                <td>{{expert.iIndex.toFixed(2)}}</td>
                                <td><img id="iIndex-img" height="9" width="14"/></td>
                            </tr>
                            <tr>
                                <td>P-index:</td>
                                <td>{{expert.pIndex.toFixed(2)}}</td>
                                <td><img id="pIndex-img" height="9" width="14"/></td>
                            </tr>
                            <tr>
                                <td>#Publications:</td>
                                <td>{{publication}}</td>
                            </tr>
                            <tr>
                                <td>#Citation:</td>
                                <td>{{expert.citations}}</td>
                            </tr>
                        </table>
                    </div>
                    <div class="userinfo-percent">
                        <span class="img-span"><img src="../img/scholar/learning.png" height="25" width="31"/></span>
                        <span class="percent-span">{{jnum}}%</span>
                        <span class="percent-name"> Journal</span>
                    </div>
                    <div class="userinfo-percent">
                        <span class="img-span"><img src="../img/scholar/meeting.png" height="27" width="31"/></span>
                        <span class="percent-span">{{cnum}}%</span>
                        <span class="percent-name">Conference</span>
                    </div>
                    <div class="userinfo-percent">
                        <span class="img-span"><img src="../img/scholar/patent.png" height="31" width="22"/></span>
                        <span class="percent-span">{{bnum}}%</span>
                        <span class="percent-name">Book</span>
                    </div>
                    <div class="userinfo-percent">
                        <span class="img-span"><img src="../img/scholar/other.png" height="26" width="26"/></span>
                        <span class="percent-span">{{patentnum}}%</span>
                        <span class="percent-name">Patent</span>
                    </div>
                    <div style="height: 40px;width: 100px"></div>
                </div>
                <div class="col-md-10 content-margin">
                    <div class="content-chart">
                        <!--<div class="search-div">-->
                        <!--<form role="search" class="" method="post" action="">-->
                        <!--<div>-->
                        <!--<i class="fa fa-search"></i><input type="text" placeholder="Optical quantum"-->
                        <!--class="input-search">-->
                        <!--</div>-->
                        <!--</form>-->
                        <!--</div>-->
                        <div class="row">
                            <div class="col-md-8">
                                <div class="main-content">
                                    <div class="second-menu" id="allMenus">
                                        <span><a href="#" class="not-active active">Journals</a>
                                            <!--<label>({{expert.jnum != undefined ? expert.jnum :0}})</label>-->
                                            <span class="badge badge-font">{{expert.jnum}}</span>
                                        </span>
                                        <span><a href="#" class="not-active">Conferences</a>
                                            <span class="badge badge-font">{{expert.cnum}}</span>
                                        </span>
                                        <span><a href="#" class="not-active">Books</a>
                                            <span class="badge badge-font">{{expert.bnum}}</span>
                                        </span>
                                        <span><a href="#" class="not-active">Patents</a>
                                            <span class="badge badge-font">{{expert.patentsNum}}</span>
                                        </span>
                                        <span><a href="#" class="not-active">Institutions</a>
                                            <!--<span class="badge badge-font">0</span>-->
                                        </span>
                                        <span><a href="#" class="not-active">Fund</a>
                                            <!--<span class="badge badge-font">0</span>-->
                                        </span>
                                        <span><a href="#" class="not-active">Awards</a>
                                            <!--<span class="badge badge-font">0</span>-->
                                        </span>
                                        <span><a href="#" class="not-active">News</a>
                                            <span class="badge badge-font">{{nsum}}</span>
                                        </span>
                                    </div>
                                    <div id="allContents">
                                        <div id="Journals">
                                            <div class="row content-p" v-for="item in papers">
                                                <a :href="'paperDetail.html?type=1&id='+item.id" target="_blank"
                                                   class="content-title"><p>{{item.title}}</p>
                                                </a>
                                                <div class="quoted-div">
                                                    <span>{{item.authors}} <template
                                                            v-if="item.authors != undefined">-</template> {{item.fPublishDate}} - Citations：{{item.citations}} - Publish:{{item.publisher}}</span>
                                                    <span><a :href="item.url" target="_blank"
                                                             class="url">{{item.url}}</a></span>
                                                </div>
                                            </div>
                                        </div>
                                        <div id="Conferences">
                                            <div class="row content-p" v-for="item in conferences">
                                                <a :href="'paperDetail.html?type=2&id='+item.id" target="_blank"
                                                   class="content-title"><p>{{item.title}}</p>
                                                </a>
                                                <div class="quoted-div">
                                                    <span>{{item.authors}} <template
                                                            v-if="item.authors != undefined">-</template> {{item.fPublishDate}} - Citations：{{item.citations}} - Publish:{{item.publisher}}</span>
                                                    <span><a :href="item.url" target="_blank"
                                                             class="url">{{item.url}}</a></span>
                                                </div>
                                            </div>
                                        </div>
                                        <div id="Books">
                                            <div class="row content-p" v-for="item in books">
                                                <p class="content-title">{{item.bookName}}</p>
                                                <div class="quoted-div">
                                                    <span v-if="item.bookSubtitle !=null && item.bookSubtitle.length>0">Title:&nbsp;&nbsp;{{item.bookSubtitle}}</span>
                                                    <span>Authors：&nbsp;&nbsp;{{item.authors}}&nbsp;&nbsp;&nbsp;&nbsp;{{item.fPublishDate}}</span>
                                                    <span v-if="item.publisher !=null && item.publisher.length>0">Publish：&nbsp;&nbsp;{{item.publisher}}</span>
                                                    <!--<span>{{item.publisher}} <template-->
                                                    <!--v-if="item.publisher != undefined">-</template> {{item.year}} - -->
                                                    <!--Publisher：{{item.publisher}} - Language: {{item.language}} - Pages: {{item.pages}}</span>-->
                                                </div>
                                            </div>
                                        </div>
                                        <div id="Patents">
                                            <div class="row content-p" v-for="item in patents">
                                                <a :href="'patentsDetail.html?id='+item.id" target="_blank"
                                                   class="content-title"><p>{{item.fTitle}}</p>
                                                </a>
                                                <div class="quoted-div">
                                                    <span>{{item.fAuthors}} <template
                                                            v-if="item.fAuthors != undefined">-</template> {{item.fPublishDate}} <template
                                                            v-if="item.fPublishDate != undefined">-</template> Citations：{{item.cit}}
                                                    </span>
                                                    <span v-for="url in item.urls"><a :href="url" target="_blank"
                                                                                      class="url">{{url}}</a></span>
                                                </div>
                                            </div>
                                        </div>
                                        <div id="News">
                                            <div class="row content-p" v-for="item in news">
                                                <a :href="item.url" target="_blank" class="content-title"><p
                                                        v-html="item.titleSrc"></p>
                                                </a>

                                                <div class="quoted-div">
                                                    <span v-html="newsText(item.abstractEn)"></span>
                                                    <span class="mediaNameSrc">{{item.mediaNameSrc}}&nbsp;&nbsp;&nbsp;&nbsp;{{item.pubTime | formatDate}}</span>
                                                    <!--<span>{{item.name}} <template-->
                                                    <!--v-if="item.name != undefined">-</template> {{item.pubTime}} - Media：{{item.mediaNameSrc}}</span>-->
                                                </div>
                                                <!--<div class="content-item">
                                                    <span><i class="fa fa-heart-o" aria-hidden="true"></i>Collection</span>
                                                    <span><i class="fa fa-file-o" aria-hidden="true"></i>Relevant articles</span>
                                                    <span><i class="fa fa-code" aria-hidden="true"></i></i>Quote</span>
                                                    <span><i class="fa fa-files-o" aria-hidden="true"></i>Similarity degree: 98</span>
                                                </div>-->
                                            </div>

                                            <div class="text-center">
                                                <div class="btn-group">
                                                    <ul class="pagination" id="pagination2"></ul>
                                                </div>
                                            </div>

                                            <div class="row content-p">
                                                <div class="feed-element" v-for="item in socials">
                                                    <span class="pull-left">
                                                        <img :src="'../img/scholar/'+item.sourceType+'.jpg'" height="44"
                                                             width="44"/>
                                                    </span>
                                                    <div class="media-body media-news">
                                                        <span class="pull-right">{{item.updateTimeStr}}&nbsp;&nbsp;&nbsp;&nbsp;{{item.sourceType}}</span>
                                                        <span class="content-title">
                                                            <a :href="'newsDetail.html?type=2&id='+item.id"
                                                               target="_blank" class="content-title"
                                                               v-html="substring30(item.title)">
                                                            </a>
                                                        </span>
                                                        <br>
                                                        <span class="text-muted"
                                                              v-html="substring200(item.textEn)"></span>
                                                    </div>
                                                </div>
                                            </div>

                                        </div>

                                    </div>
                                    <div class="text-center">
                                        <div class="btn-group">
                                            <ul class="pagination" id="pagination1"></ul>
                                        </div>
                                    </div>
                                    <div class="learn-loading">
                                        <div class="sk-spinner sk-spinner-three-bounce">
                                            <div class="sk-bounce1"></div>
                                            <div class="sk-bounce2"></div>
                                            <div class="sk-bounce3"></div>
                                        </div>
                                    </div>
                                </div>

                            </div>
                            <div class="col-md-4 no-padding-left">
                                <div class="cooperative-scholar">
                                    <div class="index-analysis">
                                        Cooperative scholars
                                    </div>
                                    <div class="row person">
                                        <div class="col-md-4 person-item" v-for="(item,index) in expertRelation"
                                             v-if="index < 6" @click="showExpertDetail(item.id)">
                                            <img :src="item.img" class="scholar-head" :title="item.name"
                                                 onerror="nofind_(this)"/>
                                            <span :title="item.name">{{item.name != undefined && item.name.length>7?item.name.substring(0,7)+'...':item.name}}</span>
                                        </div>
                                    </div>
                                    <div class="view">
                                        <span><a
                                                href="wisdomAtlas.html?atlasType=scholar">View the relationship</a></span>
                                    </div>
                                </div>
                                <div class="cooperative-scholar">
                                    <div class="index-analysis">
                                        Cooperative agencies
                                    </div>
                                    <div class="agency">
                                        <div class="agency-item" v-for="item in orgs">
                                            <span class="agency-i"></span>
                                            <span class="agency-span">{{item.name}}</span>
                                        </div>
                                    </div>
                                    <div class="view">
                                        <span><a href="wisdomAtlas.html?atlasType=institution">View the relationship</a></span>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="cleanBoth"></div>
            </div>
        </div>
    </div>
    <div class="bottom">
        <span class="bottom-left">中译语通科技股份有限公司&nbsp;&nbsp;&nbsp;&nbsp;版权所有</span>
        <span class="bottom-right">Copyright © 2018-京ICP备13002826号-9</span>
    </div>
</div>
<div id="layer" style="display: none">
    <ul class="paperUrlArray">
        <li v-for="item in paperUrls">
            <a :href="item" target="view_window">{{item}}</a>
        </li>
    </ul>
</div>

<script src="../js/jquery.min.js"></script>
<script src="../js/bootstrap.min.js"></script>
<script src="../js/polyfill.min.js"></script>
<script src="../js/vue.min.js"></script>
<script src="../js/echarts/echarts.min.js"></script>
<script src="../js/plugins/treeview/bootstrap-treeview.js"></script>
<script src="../js/layer/layer.js"></script>
<script src="../js/gAjax.js"></script>
<script src="../js/jqPaginator.js"></script>

<script>
    window.onscroll = function () {
        if ($(window).scrollTop() > 0) {
            if (!$(".header").hasClass("s_down")) {
                $(".header").addClass("s_down");
            }
        } else {
            $(".header").removeClass("s_down");
        }
    }

    Vue.prototype.newsText = function (value) {
        value = value ? value : "";
        return value.replace(/<BR\s*\/?>/g, "") + " ...... ";
    };
    Vue.prototype.substring200 = function (value) {
        return value.substring(0, 200) + (value.length > 200 ? "..." : '');
    };
    Vue.prototype.substring30 = function (value) {
        return value.substring(0, 30) + (value.length > 30 ? '...' : '');
    };

    var KingVue = new Vue({
        el: '#box',
        data: {
            resourceUrl: "",
            expert: {},
            papers: [],
            news: [],
            books: [],
            patents: [],
            expertRelation: {},
            keyword: "",
            zh_keyword: "",
            conferences: [],
            socials: [],
            jnum: 0,
            cnum: 0,
            bnum: 0,
            patentnum: 0,
            orgs: [],
            publication: 0,
            qo: {},
            nsum: "*",
            timestamp_: new Date().getTime()
        },
        created: function () {

            var _this = this;
            var scholarId = getStorage("scholarId");

            $.ajax({
                url: gAjax.httpUrl + "expert/getExpertDetail",
                data: {id: scholarId},
                dataType: "json",
                async: false,
                method: "post",
                headers: {
                    'content-type': 'application/x-www-form-urlencoded',
                    'Authorization': getLoginToken()
                },
                success: function (res) {

                    if (10000 == res.code) {
                        var result = res.data;
                        _this.expert = result;
                    }
                }
            });
        },
        mounted: function () {
            var _this = this;

            _this.expert.foSets = _this.expert.foSets.slice(0, 5);

            $("#allMenus span a").click(function () {
                $("#allContents").children("div").hide();
                $("#" + $(this).text()).show();

                $("#allMenus span a").removeClass("active");
                $(this).addClass("active");

                switch ($(this).text()) {
                    case "Journals":
                        _this.queryPapersByExpertId(1);
                        break;
                    case "Conferences":
                        _this.queryConferencesByExpertId(1);
                        break;
                    case "Books":
                        _this.queryBooksByExpertId(1);
                        break;
                    case "Patents":
                        _this.queryPatentsByExpertId(1);
                        break;
                    case "News":
                        _this.queryNewsByExpertId(1,false);
                        _this.querySocialsByExpertId(1,false);
                        break;
                }
            });

            $("#allContents").children("div").hide();
            $("#Journals").show();
            _this.queryPapersByExpertId(1, "Journal");
            _this.queryExpertRelation();
            _this.queryOrgsByExpertId();
            _this.queryNewsByExpertId(1,true);
            _this.querySocialsByExpertId(1,true);
            // _this.queryPIndexTrend()

            _this.resourceUrl = gAjax.resourceUrl;


            var jnum = _this.expert.jnum;
            var cnum = _this.expert.cnum;
            var bnum = _this.expert.bnum;
            var patentnum = _this.expert.patentsNum;
            var sum = jnum + cnum + bnum + patentnum;
            _this.publication = sum;
            _this.jnum = jnum > 0 && sum > 0 ? (jnum * 100 / sum).toFixed(2) : 0;
            _this.cnum = cnum > 0 && sum > 0 ? (cnum * 100 / sum).toFixed(2) : 0;
            _this.bnum = bnum > 0 && sum > 0 ? (bnum * 100 / sum).toFixed(2) : 0;
            _this.patentnum = patentnum > 0 && sum > 0 ? (patentnum * 100 / sum).toFixed(2) : 0;


            /*_this.nsum = _this.expert.nnum + _this.expert.snum;*/


            //_this.queryExpertDetail();

            _this.keyword = getStorage("scholar_searchKeyword");
            _this.zh_keyword = encodeURI(_this.keyword);
            _this.queryIndexTrend();
        },
        methods: {
            showExpertDetail: function (scholarId) {
                window.location.href = "analysis.html?scholarId=" + scholarId;
            },
            switchMenu: function (element) {
                //console.log(element.currentTarget)
            },
            queryExpertDetail: function () {/*查专家详细信息*/
                var _this = this;
                gAjax.requestNoAsync("expert/getExpertDetail", {id: _this.expert.id}).then(function (result) {
                    _this.expert = result;
                    //console.log(JSON.stringify(result));
                });
            },
            queryPapersByExpertId: function (pageNo) {/*专家的论文*/
                $("#allContents").hide();
                $(".learn-loading").show();
                var _this = this;
                _this.qo.pageNo = pageNo;
                _this.qo.expertId = _this.expert.id;
                _this.qo.docType = "1";

                gAjax.requestNoAsync("neo4j/paper/getPapersByExpertId", _this.qo).then(function (result) {
                    _this.papers = result.content;
                    //console.log(result.content)
                    for (var i in _this.papers) {
                        if (_this.papers[i].url != null) {
                            try {
                                var urls_ = JSON.parse(_this.papers[i].url);
                                if (urls_.length > 0) {
                                    _this.papers[i].url = urls_[0];
                                }
                            } catch (e) {

                            }

                        }
                    }
                    //console.log(JSON.stringify(result.content));
                    /*
                        * 分页传参 ：容器id，总页数，当前页码，回调函数
                        */
                    pageInit("#pagination1", result.totalPages, result.number, _this.queryPapersByExpertId);

                    $(".learn-loading").hide();
                    $("#allContents").show();
                });
            },

            queryConferencesByExpertId: function (pageNo) {/*专家的会议*/
                $("#allContents").hide();
                $(".learn-loading").show();
                var _this = this;
                _this.qo.pageNo = pageNo;
                _this.qo.expertId = _this.expert.id;
                _this.qo.docType = "3";

                gAjax.requestNoAsync("neo4j/paper/getPapersByExpertId", _this.qo).then(function (result) {
                    _this.conferences = result.content;
                    for (var i in _this.conferences) {
                        if (_this.conferences[i].url != null) {
                            try {
                                var urls_ = JSON.parse(_this.conferences[i].url);
                                if (urls_.length > 0) {
                                    _this.conferences[i].url = urls_[0];
                                }
                            } catch (e) {

                            }

                        }
                    }

                    //console.log(JSON.stringify(result.content));
                    /*
                        * 分页传参 ：容器id，总页数，当前页码，回调函数
                        */
                    pageInit("#pagination1", result.totalPages, result.number, _this.queryConferencesByExpertId);
                    $(".learn-loading").hide();
                    $("#allContents").show();
                });
            },
            queryNewsByExpertId: function (pageNo,flag) {/*专家的新闻*/
                if(!flag) {
                    $("#allContents").hide();
                    $(".learn-loading").show();
                }
                var _this = this;
                _this.qo.pageNo = pageNo;
                _this.qo.realName = _this.expert.name;
                _this.qo.institution = _this.expert.authorsOrg;
                gAjax.requestNoAsync("yeesight/news/query/page", _this.qo).then(function (result) {
                    console.log(result);
                    if (result != null && result.returnCode != 0) {
                        if(!flag){
                            _this.news = result.returndata.resultList;
                            var totalPages = Math.ceil(result.returndata.resultCount / 10);
                            pageInit("#pagination2", totalPages, pageNo - 1, _this.queryNewsByExpertId);
                        }

                        if (flag) {
                            _this.nsum = _this.nsum == "*" ? result.returndata.resultCount : (_this.nsum + result.returndata.resultCount);
                        }
                    }
                    if(!flag) {
                        $(".learn-loading").hide();
                        $("#allContents").show();
                    }
                });
            },
            querySocialsByExpertId: function (pageNo,flag) {/*专家的社交媒体*/
                debugger;
                if(!flag){
                    $("#allContents").hide();
                    $(".learn-loading").show();
                }
                var _this = this;
                var _this = this;
                _this.qo.pageNo = pageNo;
                _this.qo.realName = _this.expert.name;
                _this.qo.institution = _this.expert.authorsOrg;
                gAjax.requestNoAsync("yeesight/social/query/page", _this.qo).then(function (result) {
                    console.log(result);
                    if (result != null && result.returnCode != 0) {
                        if(!flag) {
                            _this.socials = result.returndata.resultList;
                            var totalPages = Math.ceil(result.returndata.resultCount / 10);
                            pageInit("#pagination1", totalPages, pageNo - 1, _this.querySocialsByExpertId);
                        }

                        if(flag) {
                            _this.nsum = _this.nsum == "*" ? result.returndata.resultCount : (_this.nsum + result.returndata.resultCount);
                        }
                    }
                    if(!flag) {
                        $(".learn-loading").hide();
                        $("#allContents").show();
                    }
                });
            },
            queryOrgsByExpertId: function () {/*专家的机构*/
                var _this = this;
                gAjax.requestNoAsync("org/getRelateOrg", {id: _this.expert.id}).then(function (result) {
                    _this.orgs = result;
                    //console.log(JSON.stringify(result));
                });
            },
            queryBooksByExpertId: function (pageNo) {/*专家的图书*/
                $("#allContents").hide();
                $(".learn-loading").show();
                var _this = this;
                _this.qo.pageNo = pageNo;
                _this.qo.expertId = _this.expert.id;
                gAjax.requestNoAsync("neo4j/book/getBooksByExpertId", _this.qo).then(function (result) {
                    _this.books = result.content;
                    //console.log(JSON.stringify(result.content));
                    console.log(JSON.stringify(_this.papers));
                    pageInit("#pagination1", result.totalPages, result.number, _this.queryBooksByExpertId);

                    $(".learn-loading").hide();
                    $("#allContents").show();
                });
            },
            showPaperUrls: function (urlArray) {
                layerVue.paperUrls = JSON.parse(urlArray);
                //捕获页
                layer.open({
                    type: 1,
                    shade: [0.7, '#393D49'],
                    area: ['600px', '400px'], //宽高
                    title: false, //不显示标题
                    content: $("#layer"), //捕获的元素，注意：最好该指定的元素要存放在body最外层，否则可能被其它的相对元素所影响
                    cancel: function () {
                    }
                });
            },
            queryExpertRelation: function () {
                var _this = this;
                gAjax.requestNoAsync("expert/getRelateExpert", {id: _this.expert.id}).then(function (result) {
                    var data = [];
                    for (var key in result) {
                        var expert_l = result[key];
                        for (var i in expert_l) {
                            console.log(expert_l[i].img);
                            data.push({
                                id: expert_l[i].id,
                                name: expert_l[i].name,
                                img: (expert_l[i].img == undefined || expert_l[i].img == null || expert_l[i].img == '') ? "../img/scholar/head/user-head.png" : _this.resourceUrl + expert_l[i].img,
                            });
                        }
                    }
                    _this.expertRelation = data;
                    // console.log(JSON.stringify(data))
                });

            },

            queryIndexTrend: function () {
                var _this = this;
                gAjax.request("expert/queryIndexTrend", {
                    fId: _this.expert.fId
                }).then(function (result) {
                    var trend = JSON.parse(result.indexTrend);
                    console.log(trend);

                    _this.trendValue(trend[0], "nIndex-img");
                    _this.trendValue(trend[1], "aIndex-img");
                    _this.trendValue(trend[2], "pIndex-img");
                    _this.trendValue(trend[3], "iIndex-img");
                })
            },

            trendValue: function (value, indexName) {
                if (value == 0) {
                    $("#" + indexName).attr("src", "../img/scholar/stable.png");
                } else if (value == 1) {
                    $("#" + indexName).attr("src", "../img/scholar/up.png");
                } else if (value == -1) {
                    $("#" + indexName).attr("src", "../img/scholar/down.png");
                }
            },

            queryPatentsByExpertId: function (pageNo) {/*专家的专利*/
                $("#allContents").hide();
                $(".learn-loading").show();
                var _this = this;
                _this.qo.pageNo = pageNo;
                _this.qo.expertId = _this.expert.id;
                gAjax.requestNoAsync("neo4j/patents/getPatentsById", _this.qo).then(function (result) {
                    _this.patents = result.content;
                    //console.log(JSON.stringify(result.content));
                    console.log(JSON.stringify(_this.patents));

                    pageInit("#pagination1", result.totalPages, result.number, _this.queryPatentsByExpertId);

                    $(".learn-loading").hide();
                    $("#allContents").show();
                });
            }
        },
        filters: {
            formatDate: function (val) {
                var value = new Date(val);
                var year = value.getFullYear();
                var month = padDate(value.getMonth() + 1);
                var day = padDate(value.getDate());
                return year + '-' + month + '-' + day;
            }
        }
    });
    var padDate = function (va) {
        va = va < 10 ? '0' + va : va;
        return va
    }
    var layerVue = new Vue({
        el: '#layer',
        data: {
            paperUrls: []
        }
    });
</script>
</body>
</html>